package com.wr.hangzhounewlight.controller.frontend;

import com.wr.hangzhounewlight.obj.dto.frontend.R;
import com.wr.hangzhounewlight.obj.dto.frontend.RecipeListDTO;
import com.wr.hangzhounewlight.service.frontend.RecipeListService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yuanzhizhuo
 * createDate 2025/11/14
 */
@CrossOrigin
@RestController
public class RecipeListController {

    private final RecipeListService recipeListService;

    public RecipeListController(RecipeListService recipeListService) {
        this.recipeListService = recipeListService;
    }

    @PostMapping("/query-recipe-list")
    public R queryRecipeList(@RequestBody RecipeListDTO dto) {
        return recipeListService.queryRecipeList(dto);
    }

}
